{extend name="sitehome@style/base"/}
{block name="resources"}
{/block}
{block name="main"}
<div class="layui-form">
     <div class="nc-quote-box">
         <blockquote class="layui-elem-quote layui-quote-nm">常规信息</blockquote>
		 <div class="layui-form-item">
			 <label class="layui-form-label"><span class="required">*</span>文章标题</label>
			 <div class="layui-input-inline">
				 <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>

		 <div class="layui-form-item">
			 <label class="layui-form-label">文章短标题</label>
			 <div class="layui-input-inline">
				 <input type="text" name="short_title" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章标签</label>
			 <div class="layui-input-inline">
				 <input type="text" name="tag" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label img-upload-lable">文章标题图片</label>
			 <div  class="layui-input-inline article img-upload">
				 <div>
					 <input type="hidden" class="layui-input" name = "title_img" value="" />
					 <div class="upload-img-inline title_img">
						 <div class="upload-img-box" onclick="uploadSingletitle_img()" >
							 <div>
								 <i class="add">+</i>
							 </div>
						 </div>
					 </div>
					 {:hook("fileUpload", ["name" => "title_img", "file_type" => "IMAGE", "type" => "common"], '', true)}
				 </div>
				 <div style="clear: both"></div>
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章作者</label>
			 <div class="layui-input-inline">
				 <input type="text" name="author" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章来源</label>
			 <div class="layui-input-inline">
				 <input type="text" name="source" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章来源链接</label>
			 <div class="layui-input-inline">
				 <input type="text" name="url" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>

		 <div class="layui-form-item">
			 <label class="layui-form-label"><span class="required">*</span>文章分类</label>
			 <div class="layui-input-inline nc-len-small">
				 <select name="category_id" lay-verify="category_id">
					 <option value="0">请选择</option>
					 {volist name="list_tree" id="vo"}
					 <option value="{$vo.category_id}">{$vo.category_name}</option>
					 {volist name="vo['child_list']" id="v1"}
					 <option value="{$v1.category_id}">&nbsp;&nbsp;&nbsp;&nbsp;{$v1.category_name}</option>
					 {/volist}
					 {/volist}
				 </select>
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章关键字</label>
			 <div class="layui-input-inline">
				 <input type="text" name="keyword" autocomplete="off" placeholder="" class="layui-input nc-len-long">
			 </div>
		 </div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">文章摘要</label>
			 <div class="layui-input-inline">
				 <textarea name="summary" autocomplete="off" placeholder="" class="layui-textarea nc-len-long"></textarea>
			 </div>
		 </div>
	</div>

	<div class="nc-quote-box">
        <blockquote class="layui-elem-quote layui-quote-nm">文章内容</blockquote>
          <div class="layui-form-item">
              <label class="layui-form-label">文章内容</label>
              <div class="layui-input-inline">
                  <textarea id="editor"></textarea>
              </div>
          </div>

          <div  class="layui-form-item">
              <label class="layui-form-label">文章附件</label>
              <div class="layui-input-inline  article">
                  {:hook("fileUpload", ['name' => 'article', 'type' => 'common', 'file_type' => 'ATTACHMENT'], '', true)}
                  <div>
                      <button type="button" class="layui-btn layui-btn-sm" onclick="uploadEnclosurearticle()">上传附件</button>
                  </div>
                  <input type="hidden" name="attachment_path" autocomplete="off" placeholder="" class="layui-input nc-len-long" style="margin-top:10px;">
              </div>
          </div>
	</div>
	
	<div class="nc-quote-box">
        <blockquote class="layui-elem-quote layui-quote-nm">文章阐述</blockquote>
          <div class="layui-form-item">
              <label class="layui-form-label">是否推荐</label>
              <div class="layui-input-inline">
                  <input type="checkbox" class="layui-input" name="commend_flag" value="1" lay-skin="switch" >
              </div>
          </div>

          <div  class="layui-form-item">
              <label class="layui-form-label">是否允许评论</label>
              <div class="layui-input-inline">
                  <input type="checkbox" class="layui-input" name="comment_flag" value="1" lay-skin="switch">
              </div>
          </div>

          <div  class="layui-form-item">
              <label class="layui-form-label">文章排序</label>
              <div class="layui-input-inline">
                  <input type="number" name="sort" autocomplete="off" placeholder="" class="layui-input nc-len-short">
              </div>
          </div>

          <div  class="layui-form-item">
              <label class="layui-form-label">文章点击量</label>
              <div class="layui-input-inline">
                  <input type="number" name="click"  autocomplete="off" placeholder="" class="layui-input nc-len-short">
              </div>
              <span class="layui-form-mid">次</span>
          </div>
          <div  class="layui-form-item">
              <label class="layui-form-label">文章评论数</label>
              <div class="layui-input-inline">
                  <input type="number" name="comment_count" autocomplete="off" placeholder="" class="layui-input nc-len-short">
              </div>
              <span class="layui-form-mid">次</span>
          </div>
          <div  class="layui-form-item">
              <label class="layui-form-label">文章分享数</label>
              <div class="layui-input-inline">
                  <input type="number" name="share_count" autocomplete="off" placeholder="" class="layui-input nc-len-short">
              </div>
              <span class="layui-form-mid">次</span>
          </div>
          <div class="nc-form-row">
              <button class="layui-btn" lay-submit lay-filter="btnArticle" type="button">保存</button>
              <button class="layui-btn layui-btn-primary" onclick="window.location.href = window.history.go(-1);">返回</button>
          </div>
	</div>
	
</div>

{/block}
{block name="script"}
<script>
var editor = new Editor("editor",{});
</script>
<script src="ARTICLE_JS/article.js"></script>
{/block}